<?php
namespace Managers;
class Mailsend extends BaseManager
{

    static $President = array('president@mallardsswimming.com');
    static  $Vice = array('vicepresident@mallardsswimming.com','serge_swim@rogers.com','philbowmile@hotmail.com');
    static $Head = array('headcoach@mallardsswimming.com');
    static $Age = array('Agegroupcoach@mallardsswimming.com','serge_swim@rogers.com','arena@mail.ru');
    static $Meet = array('Meetmanager@mallardsswimming.com','serge_swim@rogers.com','vhughsam@gmail.com','calverts1327@gmail.com','bvhughsam@rogers.com');
    static $Treasurer = array('tresurer@mallardsswimming.com');
    static $Relations = array('info@mallardsswimming.com');
    static $Officialsr = array('officialschair@mallarsswimming.com','serge_swim@rogers.com', 'lhewwing@royalspecialty.com', 'lhewwing@gmail.com');
    static $Shop = array('shopandsupport@mallardsswimming.com','serge_swim@rogers.com','arena@mail.ru,mojining@yahoo.com');
    static $Webmaster = array('webmaster@mallardsswimming.com');
    static $gresko=array('greskos@gmail.com');


    static function sendEmail($id, $subject, $message, $email )
    {
         switch($id)
         {
             case 'president':
                 $emailto=self::$President;
                 break;
             case 'vice':
                 $emailto=self::$Vice;
                 break;
             case 'headc':
                 $emailto=self::$Head;
                 break;
             case 'age':
                 $emailto=self::$Age;
                 break;
             case 'meetman':
                 $emailto=self::$Meet;
                 break;
             case 'treasure':
                 $emailto=self::$Treasurer;
                 break;
             case 'relations':
                 $emailto=self::$Relations;
                 break;
             case 'officials':
                 $emailto=self::$Officialsr;
                 break;
             case 'shopsupp':
                 $emailto=self::$Shop;
                 break;
             case 'webmaster':
                 $emailto=self::$Webmaster;
                 break;
             case 'gresko':
                 $emailto=self::$gresko;
                 break;
             default: $emailto=array('myipodt@gmail.com');
                 break;



         }
        $mail = new \Zend_Mail();
        $mail->setSubject($subject);
        $mail->setBodyHtml($message);
        $mail->addTo($emailto);
        $mail->addTo('myipodt@gmail.com');
        $mail->setFrom($email);
        $mail->send();





    }
}
?>